﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using HNCDataSetTableAdapters;

public partial class UserControl_footer : System.Web.UI.UserControl
{
    InfoTableAdapter info = new InfoTableAdapter();
    ProductsTableAdapter pro = new ProductsTableAdapter();
    CategoryTableAdapter cate = new CategoryTableAdapter();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //counter();
            loadfooter();
            loadCustomer();
        }
    }


    public void loadCustomer()
    {
        DataTable dt = pro.GetProductByCateID(10);
        rptCustomer.DataSource = dt;
        rptCustomer.DataBind();
    }

    public void loadfooter()
    {
        DataTable dt = info.GetInfoByID(1);
        lblTitle.Text = FuntionHNC.GetLanguage(dt.Rows[0]["Title"].ToString(),dt.Rows[0]["Title_en"].ToString());
        lblAddress.Text = FuntionHNC.GetLanguage(dt.Rows[0]["Address"].ToString(),dt.Rows[0]["Address_en"].ToString());
        lblHotline.Text = dt.Rows[0]["Phone"].ToString();
        lblEmail.Text = dt.Rows[0]["Email"].ToString();
    }



    //    public void counter()
    //    {
    //        lbOnlne.Text = Application.Get("Online").ToString();
    //        lbLuottruycap.Text = Application.Get("Access").ToString();
    //    }
}